#include <stdio.h>
#include <stdlib.h>

int sort_function(const void *a, const void *b);

int list[5] = {54, 21, 11, 67, 22};

int sort_function(const void *a, const void *b)
{
	printf("\ta = %d  b = %d\n", *(int*)a, *(int*)b);
	return *(int*)a - *(int*)b;
}

void t()
{
	int x;
	
	printf("%ld\n", sizeof(long double));	// 16
	printf("%ld\n", sizeof(long long));		// 8
	printf("%ld\n", sizeof(double));		// 8
	printf("%ld\n", sizeof(long));			// 8
	printf("%ld\n", sizeof(short));			// 2
	printf("%d\n", 0x7c << 12);				// 507904
	x = 20;
	x = (((x >= 4) && (x < (4 + 2))) ? 10 : 
		 ((x >= 7) && (x < (8 + 1))) ? 11 :
		 0xff);
	printf("%d\n", x);		// 255
}

int main()
{
	int x;
	
	qsort((void*)list, 5, sizeof(list[0]), sort_function);

	for (x = 0; x < 5; x++) {
		printf("%i\n", list[x]);	// 11 21 22 54 67
	}

	t();
		
	return 0;
}
